/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Ejercicios_salon;

import java.io.*;

/**
 *
 * @author Lab
 */
public class Rimaonorima {
public static void main(String[] args)  {
        // TODO code application logic here
        try {
        File x = new File("rimaonorima.txt");
        FileReader z = new FileReader(x);
       BufferedReader buffer = new BufferedReader(z);
       String cad=buffer.readLine();
       String cad2=buffer.readLine();
       String cad3=buffer.readLine();
       String cad4=buffer.readLine();
            System.out.println(cad);
            System.out.println(cad2);
            System.out.println(cad3);
            System.out.println(cad4);
            if(cad.endsWith(cad3.substring(cad3.length()-3, cad3.length()))&&cad2.endsWith(cad4.substring(cad4.length()-3, cad4.length()))){
                System.out.println("Si son rimas");
            }
            else{
                System.out.println("No son rimas");
            }
        } catch (Exception ex) {
            System.out.println(ex);
        }

    }
}

